package com.dotools.privacy;


import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.webkit.WebView;
import android.widget.ImageView;
import android.widget.TextView;

import com.dotools.procommon.R;

public class AgreementActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_agree);
        ImageView back = (ImageView) findViewById(R.id.ido_user_project_back);
        WebView webView = findViewById(R.id.privacy_webview);
        TextView title = findViewById(R.id.title);
        title.setText(getString(R.string.activity_user_agreement_title));
        back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
        webView.getSettings().setSavePassword(false);//明文密码漏洞配置
        webView.getSettings().setAllowFileAccess(false);//同源策略绕过
        webView.getSettings().setJavaScriptEnabled(false);//同源策略绕过
        webView.loadUrl(getAgrUrl());
    }

    private String getAgrUrl() {
        switch (getPackageName()) {
            case "com.syido.idotask":
                return "http://wordpress.m1book.com/用户协议";
            case "com.syido.express":
                return "http://wordpress.m1book.com/用户协议-2";
            case "com.iboxltt.flashlight":
                return "http://wordpress.m1book.com/用户协议-37";
            case "com.ibox.calculators":
            case "com.ibox.calculators.split":
                return "http://wordpress.m1book.com/用户协议-3";
            case "com.syido.metaphysics":
                return "http://wordpress.m1book.com/用户协议-15";
            case "com.idoconstellation":
                return "http://wordpress.m1book.com/用户协议-34";
            case "com.syido.decibel":
                return "http://wordpress.m1book.com/用户协议-39";
            case "com.sydo.perpetual.calendar":
                return "http://wordpress.m1book.com/用户协议-42";
            case "com.syido.maestro":
                return "http://wordpress.m1book.com/用户协议-44";
            case "com.ido.compass":
                return "http://wordpress.m1book.com/用户协议-54";
            case "com.dotools.note":
                return "http://wordpress.m1book.com/用户协议-29";
            case "com.readily.calculators":
                return "http://wordpress.m1book.com/用户协议-25";
            case "com.dotools.clock":
                return "http://wordpress.m1book.com/用户协议-28";
            case "com.fk.decibel":
                return "http://wordpress.m1book.com/用户协议-39";
            case "com.one.click.ido.screenshot":
                return "http://wordpress.m1book.com/用户协议-11";
            case "com.ido.oneclick.screenshotHelper":
                return "http://wordpress.m1book.com/用户协议-47";
            case "com.ejnet.weathercamera":
                return "http://wordpress.m1book.com/用户协议-32";
            case "com.second.stepcount":
                return "http://wordpress.m1book.com/用户协议-73";
            case "com.syd.stepcount":
                return "http://wordpress.m1book.com/用户协议-57";
            case "com.dotools.weather":
                return "http://wordpress.m1book.com/用户协议-14";
            case "com.pocket.calculators":
                return "http://wordpress.m1book.com/用户协议-4";
            case "com.oeiskd.easysoftkey":
                return "http://wordpress.m1book.com/用户协议-36";
            case "com.sydo.idphoto":
                return "http://wordpress.m1book.com/用户协议-76";
            case "com.almighty.calculators":
                return "http://wordpress.m1book.com/用户协议-60";
            case "com.orange.onekeylockscreen":
                return "http://wordpress.m1book.com/用户协议-35";
            case "com.idofinger.lockscreen":
                return " http://wordpress.m1book.com/xieyi-jsbsp";
            case "com.iodkols.onekeylockscreen":
                return "http://wordpress.m1book.com/用户协议-23";
            case "com.ido.oneclick.screenCutImg":
                return "http://wordpress.m1book.com/用户协议-52";
            case "com.syido.elementcalculators":
                return "http://wordpress.m1book.com/用户协议-64";
            case "com.sydo.longscreenshot":
                return "http://wordpress.m1book.com/xieyi-gundongchangjieping";
            case "com.syido.netradio":
                return "http://wordpress.m1book.com/用户协议-6";
            case "com.dotools.nightcamera":
                return "http://wordpress.m1book.com/用户协议-17";
            case "com.syido.voicerecorder":
                return "http://wordpress.m1book.com/用户协议-48";
            case "com.sydo.subtitlesadded":
                return "http://wordpress.m1book.com/xieyi-spjzm";
            case "com.ido.screen.record":
                return "http://wordpress.m1book.com/用户协议-7";
            case "com.ido.screen.record.expert":
                return "http://wordpress.m1book.com/用户协议-62";
            case "com.ibox.flashlight":
                return "http://wordpress.m1book.com/用户协议-16";
            case "com.idotools.qrcode":
                return "http://wordpress.m1book.com/用户协议-10";
            case "com.sydo.re.watermark":
                return "http://wordpress.m1book.com/用户协议-79";
            case "com.idostudy.mathematicss":
                return "http://wordpress.m1book.com/用户协议-78";
            case "com.master.onelockscreen":
                return "http://wordpress.m1book.com/用户协议-59";
            case "com.ido.projection":
                return "http://wordpress.m1book.com/用户协议-18";
            case "com.ido.barrage":
                return "http://wordpress.m1book.com/用户协议-20";
            case "com.ltt.compass":
                return "http://wordpress.m1book.com/用户协议-22";
            case "com.ido.ruler":
                return "http://wordpress.m1book.com/用户协议-41";
            case "com.idotools.rings":
                return "http://wordpress.m1book.com/用户协议-9";
            case "com.syido.timer":
                return "http://wordpress.m1book.com/用户协议-75";
            case "com.ido.eye.protection":
                return "http://wordpress.m1book.com/用户协议-81";
            case "com.sydo.puzzle":
                return "http://wordpress.m1book.com/用户协议-82";
            case "com.syido.marquee":
                return "http://wordpress.m1book.com/用户协议-83";
            case "com.sydo.onekeygif":
                return "http://wordpress.m1book.com/用户协议-43";
            case "com.idostudy.picturebook":
                return "http://wordpress.m1book.com/用户协议-68";
            case "com.syour.rubbish":
                return "http://wordpress.m1book.com/用户协议-12";
            case "com.syido.answer.wiki":
                return "http://wordpress.m1book.com/用户协议-84";
            case "com.syid.measure":
                return "http://wordpress.m1book.com/用户协议-56";
            case "com.parental.controler":
                return "http://wordpress.m1book.com/用户协议-8";
            case "com.ido.shadow":
                return "http://wordpress.m1book.com/用户协议-50";
            case "com.syido.fmod":
                return "http://wordpress.m1book.com/用户协议-26";
            case "com.syido.rhythm":
                return "http://wordpress.m1book.com/用户协议-90";
            case "com.idostudy.chengyu":
                return "http://wordpress.m1book.com/用户协议-95";
            case "com.idostudy.babyw":
                return "http://wordpress.m1book.com/用户协议-96";
            case "com.idostudy.shici":
                return "http://wordpress.m1book.com/用户协议-98";
            case "com.syido.extractword":
                return "http://wordpress.m1book.com/用户协议-101";
            case "com.chacha.qrcode":
                return "http://wordpress.m1book.com/用户协议-53";
            case "com.ac.pbook":
                return "http://wordpress.m1book.com/儿童绘本故事机用户协议";
            case "com.study.hanzi":
                return "http://wordpress.m1book.com/xieyi-study-hanzi";
            case "com.qimeng.naoli":
                return "http://wordpress.m1book.com/xieyi-qimeng-naoli";
            case "com.syido.idoreplaceicon":
                return "http://wordpress.m1book.com/xieyisyido-idoreplaceicon";
            case "com.diantai.youer":
                return "http://wordpress.m1book.com/xieyidiantai-yourer";
            case "com.rongyao.clock":
                return "http://wordpress.m1book.com/用户协议-51";
            case "com.sydo.audioextraction":
                return "http://wordpress.m1book.com/xieyi-yptq";
            case "com.ido.watermark.camera":
                return "http://wordpress.m1book.com/xieyi-sydk";
            case "com.bookstory.renge":
                return "http://wordpress.m1book.com/xieyirenge";
            case "com.qimeng.math":
                return "http://wordpress.m1book.com/xieyishuxue";
            case "com.idostudy.enstory":
                return "http://wordpress.m1book.com/xieyi-yingwenhuiben";
            case "com.idostudy.picture":
                return "http://wordpress.m1book.com/xieyi-kantushiwu";
            case "com.syido.weightpad":
                return "http://wordpress.m1book.com/xieyi-tizhongdaka";
            case "com.syido.changeicon":
                return "http://wordpress.m1book.com/xieyi-tubiao";
            case "com.idostudy.enword":
                return "http://wordpress.m1book.com/xieyibbword";
            case "com.qiongyou.compass":
                return "http://wordpress.m1book.com/用户协议-45";
            case "com.syido.tips":
                return "http://wordpress.m1book.com/xieyi-ls";
            case "com.idostudy.chinese":
                return "http://wordpress.m1book.com/xieyi-guoxue";
            case "com.study.dizigui":
                return "http://wordpress.m1book.com/xieyi-dizigui";
            case "com.study.privatestudy":
                return "http://wordpress.m1book.com/xieyi-syll";
            case "com.sydo.privatedomain":
                return "http://wordpress.m1book.com/xieyi-llzs";
            case "com.idostudy.gushi":
                return "http://wordpress.m1book.com/xieyi-gsczj";
            case "com.story.chengyu":
                return "http://wordpress.m1book.com/xieyi-dhw";
            case "com.erciyuan.clock":
                return "http://wordpress.m1book.com/用户协议-40";
            case "com.idostudy.errorbook":
                return "http://wordpress.m1book.com/ctb-xieyi";
            case "com.quna.compass":
                return "http://wordpress.m1book.com/用户协议-65";
            case "com.neihan.clock":
                return "http://wordpress.m1book.com/用户协议-61";
            case "com.idotools.magnifier":
                return "http://wordpress.m1book.com/xieyi-fdj";
            case "com.koudai.qrcode":
                return "http://wordpress.m1book.com/用户协议-46";
            case "com.idopartx.phonelightning":
                return "http://wordpress.m1book.com/xieyi-ldsg";

            default:
                return "";
        }
    }
}